import { BaseEntity } from '../../base';

export enum AreaType {
  /** 省 */
  PROVINCE = 'province',
  /** 市 */
  CITY = 'city',
  /** 区 */
  DISTRICT = 'district'
}

export class Area extends BaseEntity {
  pcode: string;
  code: string;
  name: string;
  type: AreaType;
  pathCode: string;

  constructor(o?: any) {
    super(o);
    this.pcode = o && o.pcode !== null ? o.pcode : null;
    this.code = o && o.code !== null ? o.code : null;
    this.name = o && o.name !== null ? o.name : null;
    this.type = o && o.type !== null ? o.type : null;
    this.pathCode = o && o.pathCode !== null ? o.pathCode : null;
  }
}
